package com.restaurant.application.indexes.couponmanagelist.support;

import com.google.common.collect.Lists;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;

public class CouponManageListShowData implements PickableBean {
    
    public static final String FN_QUERYPATH = "queryPath";
    public static final String FN_DELETEPATH = "deletePath";
    public static final String FN_AMOUNT = "amount";
    public static final String FN_INFOLIST = "infoList";
    
    public static final List<String> FIELD_NAMES = Lists.newArrayList(
             FN_QUERYPATH,
             FN_DELETEPATH,
             FN_AMOUNT,
             FN_INFOLIST);
    
    private String queryPath;
    private String deletePath;
    private Integer amount;
    private String infoList;
    
    public CouponManageListShowData(String queryPath, String deletePath, Integer amount, String infoList) {
        setQueryPath(queryPath);
        setDeletePath(deletePath);
        setAmount(amount);
        setInfoList(infoList);
    }
    
    public CouponManageListShowData() {
    }
    
    public CouponManageListShowData duplicate() {
        CouponManageListShowData result = new CouponManageListShowData();
        result.queryPath = this.queryPath;
        result.deletePath = this.deletePath;
        result.amount = this.amount;
        result.infoList = this.infoList;
        return result;
    }
    
    @Override
    public String toString() {
        return Convert.toJson(this);
    }
    
    public String getQueryPath() {
        return queryPath;
    }
    
    public void  setQueryPath(String value) {
        this.queryPath = value;
    }
    
    public CouponManageListShowData withQueryPath(String value) {
        setQueryPath(value);
        return this;
    }
    
    public CouponManageListShowData withQueryPath(String value, String defaultValue) {
        setQueryPath(value == null ? defaultValue : value);
        return this;
    }
    
    public String getDeletePath() {
        return deletePath;
    }
    
    public void  setDeletePath(String value) {
        this.deletePath = value;
    }
    
    public CouponManageListShowData withDeletePath(String value) {
        setDeletePath(value);
        return this;
    }
    
    public CouponManageListShowData withDeletePath(String value, String defaultValue) {
        setDeletePath(value == null ? defaultValue : value);
        return this;
    }
    
    public Integer getAmount() {
        return amount;
    }
    
    public void  setAmount(Integer value) {
        this.amount = value;
    }
    
    public CouponManageListShowData withAmount(Integer value) {
        setAmount(value);
        return this;
    }
    
    public CouponManageListShowData withAmount(Integer value, Integer defaultValue) {
        setAmount(value == null ? defaultValue : value);
        return this;
    }
    
    public String getInfoList() {
        return infoList;
    }
    
    public void  setInfoList(String value) {
        this.infoList = value;
    }
    
    public CouponManageListShowData withInfoList(String value) {
        setInfoList(value);
        return this;
    }
    
    public CouponManageListShowData withInfoList(String value, String defaultValue) {
        setInfoList(value == null ? defaultValue : value);
        return this;
    }
    
    public Object getValueOf(String name) {
        switch(name) {
        case "queryPath": return getQueryPath();
        case "deletePath": return getDeletePath();
        case "amount": return getAmount();
        case "infoList": return getInfoList();
        }
        return null;
    }
    
    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }
    
    @Override
    public int hashCode() {
        return signature().hashCode();
    }
    
    @Override
    public boolean equals(Object o) {
        if(!(o instanceof CouponManageListShowData)) return false;
        return signature().equals(((CouponManageListShowData)o).signature());
    }
    
    public String signature() {
        throw new RuntimeException("Bean CouponManageListShowData has no signature defined, no hash code or equals possible.");
    }
}
